/*	See licence.txt for licence. Expd S-Expressions for D*/
module expd._debug;
import expd.base;
import expd.itoken;
version(dbg)
{
    public import expd.comp;

    alias _write_line _objout;


    class DbgStreamt(T) : Streamt!(T)
    {
        void push(T a)
        {
static if(is(T : Token))
            {
                _objout(a," T:",a.type," S:",a.token);
            }
else if(is(T : Token[]))
            {
                _objout("[");
                foreach(b; a)
                {
                    _objout(b," T:",b.type," S:",b.token);
                }
                _objout("]");
            }
        }
        int subscribe(Streamable!T s)
        {
            assert(0,"cant subscribe");
        }
        uint isMulti()
        {
            return 0;   //no subscriber
        }
    }
}
